
package gui;

import abstratos.GUI;
import abstratos.Observador;
import javax.swing.JTable;
import javax.swing.table.TableColumn;

public class TelaConsultaEstoque extends javax.swing.JPanel implements GUI, Observador {

    public TelaConsultaEstoque() {
        initComponents();
        configurarTabela();
    }

    public void configurarTabela() {
        tEstoque.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        TableColumn coluna = tEstoque.getColumnModel().getColumn(0);
        coluna.setPreferredWidth(46);
        coluna = tEstoque.getColumnModel().getColumn(1);
        coluna.setPreferredWidth(212);
    }

    public void adicionarListeners() {
        throw new UnsupportedOperationException("adicionarListeners não implementado nesta classe.");
    }

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        tEstoque = new javax.swing.JTable();

        setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Estoque", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        tEstoque.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Código", "Título", "Quantidade"
            }
        ));
        tEstoque.setName("tEstoque"); // NOI18N
        tEstoque.setRowSelectionAllowed(false);
        jScrollPane1.setViewportView(tEstoque);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 335, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    public void atualizar() {
        
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable tEstoque;
    // End of variables declaration//GEN-END:variables

}
